# -*- coding: utf-8 -*-
"""
简单测试脚本
验证data_gen.py的基本功能
"""

import os
import sys

def test_import():
    """测试导入"""
    try:
        from config import Config
        print("Config导入成功")
        print("TRAIN_DATA_DIR: {}".format(Config.TRAIN_DATA_DIR))
        print("BATCH_SIZE: {}".format(Config.BATCH_SIZE))
        print("NUM_CLASSES: {}".format(Config.NUM_CLASSES))
        print("INPUT_SIZE: {}".format(Config.INPUT_SIZE))
        return True
    except Exception as e:
        print("Config导入失败: {}".format(e))
        return False

def test_data_gen_import():
    """测试data_gen导入"""
    try:
        from data_gen import BaseSequence, data_flow
        print("data_gen导入成功")
        return True
    except Exception as e:
        print("data_gen导入失败: {}".format(e))
        return False

if __name__ == '__main__':
    print("开始简单测试...")
    
    # 测试配置导入
    if not test_import():
        sys.exit(1)
    
    # 测试数据生成器导入
    if not test_data_gen_import():
        sys.exit(1)
    
    print("所有测试通过！") 